﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[Serializable]
public class PanelItem 
{
    /// <summary>
    /// 当前
    /// </summary>
    
     public string id; 
     public string areaPanelId;
    
    /// <summary>
    /// 绑定
    /// </summary>
    public string bindId;

    public string bindAreaPanelId;
    
    
    /// <summary>
    /// 位置点
    /// </summary>
    public Vector2 point;

    /// <summary>
    /// 锁类型
    /// </summary>
    public LockType lockType;

    /// <summary>
    /// 解锁需要的前
    /// </summary>
    public float money;

    /// <summary>
    /// 需要解锁多少方块才能解锁
    /// </summary>
    public int cubeNum;
        
    /// <summary>
    /// 底座类型
    /// </summary>
    public PanelType panelType;

        
    /// <summary>
    /// 路面类型
    /// </summary>
    public RoadType roadType;
        
        
    /// <summary>
    /// 是否展示
    /// </summary>
    public bool isShow;


    /// <summary>
    /// 当前绑定到到指定面板
    /// </summary>
    /// <param name="panelItem"></param>
    public void BindPanelItem(PanelItem panelItem)
    {
        if (panelItem == null)
        {
            this.bindId = "";
            this.bindAreaPanelId = "";
        }
        else
        {
            this.bindId = panelItem.id;
            this.bindAreaPanelId = panelItem.areaPanelId;
        }
    }
    

    /// <summary>
    /// 初始化
    /// </summary>
    /// <param name="id"></param>
    public void Initialize(string id,string areaPanelId)
    {
        this.id = id;
        this.areaPanelId = areaPanelId;
    }

    
    //获取基础点
    public void SetPoint(Vector2 point)
    {
        this.point = point;
    }
    
}





/// <summary>
/// 解锁类型
/// </summary>
public enum LockType
{
    Coin,//金币解锁
    Cube,//土块解锁
}
    
    
/// <summary>
/// 土地类型
/// </summary>
public enum PanelType
{
    Road, //地面
    Bridge, //桥梁
    Water,//水
    Other, //船什么的
}
    
    
public enum RoadType
{
    None = 0,
    Sunflower=1,
    Tomato = 2,
    Coin =3,
    Eggplant =4,
    Wheat = 5,
    Cherry = 6,
    Warehouse = 7,
    Warehouse2= 8,
    Milk = 9,
    Wool = 10,
    Apple = 11,
    Egg = 12,
    Watermelon =13,
    Maize =14,
    CherryTomato =16,
    FishSell =17,
    Ship = 21,
    CoinAdd= 22,
    MilkAdd = 23,
}